package com.yingdong.startup;

import java.io.File;
import java.io.FileOutputStream;
import java.nio.channels.FileLock;

public class Shutdown {
	public static void main(String[] args) throws Exception {
//		File file = new File("deamon.lock");
//		if (!file.exists()) {
//			file.createNewFile();
//		}
//		FileOutputStream outputStream = new FileOutputStream(file);
//		FileLock fileLock = outputStream.getChannel().tryLock();
//		 if (fileLock == null) {
//             System.out.println("klfjkdflgjdfkl");
//         }
//		Process listprocess;
//		listprocess = Runtime.getRuntime().exec("cmd.exe /c jps");
//		InputStream is = listprocess.getInputStream();
//		BufferedReader r = new BufferedReader(new InputStreamReader(is));
//		String str = null;
//		while ((str = r.readLine()) != null) {
//			String strs[] = str.split(" ");
//			System.out.println(strs[0]);
//		}
	}

}
